#第一步：清理impala垃圾数据，同步集群时间
for n in node01 node02 node03
do
	ssh $n "rm -rf /tmp/hsperfdata_impala"
	ssh $n "ntpdate -u 0.uk.pool.ntp.org"
wait
done

#第二步：启动伪分布式集群
#在主节点上使用以下命令启动 HDFS NameNode
ssh node01 "/export/servers/hadoop-2.6.0-cdh5.14.0/sbin/hadoop-daemon.sh start namenode"
#在每个从节点上使用以下命令启动 HDFS DataNode
for n1 in node01 node02 node03
do
	ssh $n1 "/export/servers/hadoop-2.6.0-cdh5.14.0/sbin/hadoop-daemon.sh start datanode"
wait
done
#在主节点上使用以下命令启动 YARN ResourceManager
ssh node01 "/export/servers/hadoop-2.6.0-cdh5.14.0/sbin/yarn-daemon.sh  start resourcemanager"
#在每个从节点上使用以下命令启动 YARN nodemanager
for n2 in node01 node02 node03
do
        ssh $n2 "/export/servers/hadoop-2.6.0-cdh5.14.0/sbin/yarn-daemon.sh start nodemanager"
wait
done
